$(function() {
	var userListUrl = "/ssm/user/getAllUser";
	
	$.getJSON(userListUrl,function(data){
		if(data.success){
			var userList = data.allUserList;
			var html = "";
			userList.map(function(item,index) {
				var gender = "男";
				if(item.userGender == 2){
					gender = "女";
				}
				html += '<tr><td>' + item.userId + '</td>' 
						+ '<td>' + item.userName + '</td>' 
						+ '<td>' + gender + '</td></tr>' 
			});
			$('#userList').html(html);
		}
	});
});
